package com.chlitina.store.modules.cash.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.cash.entity.StoreConsumeDoCare;

/**
 * StoreConsumeDAO接口
 * @author Songsong.Xu
 * @version 2013-11-07
 */
public interface StoreConsumeDoCareDao extends StoreConsumeDoCareDaoCustom, CrudRepository<StoreConsumeDoCare, Long> {
	@Modifying
	@Query("from StoreConsumeDoCare where EMPLOYEE_ID=?1")
	public List<StoreConsumeDoCare> findListByEmployee(long employeeID);
	
	@Modifying
	@Query("from StoreConsumeDoCare where CONSUME_ID=?1")
	public List<StoreConsumeDoCare> findListByConsume(long consumeID);
	
	
	@Modifying
	@Query("from StoreConsumeDoCare where CARE_ID=?1")
	public List<StoreConsumeDoCare> findListByCare(long careID);

}

/**
 * DAO自定义接口
 * @author Songsong.Xu
 */
interface StoreConsumeDoCareDaoCustom extends BaseDao<StoreConsumeDoCare> {

}

/**
 * DAO自定义接口实现
 * @author Songsong.Xu
 */
@Component
class StoreConsumeDoCareDaoImpl extends BaseDaoImpl<StoreConsumeDoCare> implements StoreConsumeDoCareDaoCustom {

}
